package wsz.interceptor;

import core.interceptor.Interceptor;
import core.anno.Order;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author wsz
 * @date 2021/10/29 16:35
 **/
@Order(value = 2)
public class OtherInterceptor implements Interceptor {
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
        System.out.println("OtherInterceptor-preHandle");
        return true;
    }

    @Override
    public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
        System.out.println("OtherInterceptor-postHandle");
    }

    @Override
    public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler) {
        System.out.println("OtherInterceptor-afterCompletion");
    }
}
